package com.mapper.mysql;

import com.bean.WebsiteVisitor;
import com.bean.WebsiteVisitorAbnormal;
import com.bean.WebsiteVisitorApi;
import com.bean.WebsiteVisitorUrl;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface WebsiteVisitorMapper {

    //页面访问记录
    List<WebsiteVisitor> list(WebsiteVisitor websiteVisitor);

    //接口访问记录
    List<WebsiteVisitorApi> listApi(WebsiteVisitorApi websiteVisitorApi);

    //异常访问记录
    List<WebsiteVisitorAbnormal> listAbnormal(WebsiteVisitorAbnormal websiteVisitorAbnormal);

    //网址访问记录
    List<WebsiteVisitorUrl> listUrl(WebsiteVisitorUrl websiteVisitorUrl);

    int deleteVistorByAddr(String addr);//删除访问记录

    int deleteVisitorApi(String addr);//删除访问接口的记录

    int deleteAbnormalByAddr(String addr);


    //查询只访问了 前台页面访问 /  的API访问记录
    List<String> listWebsiteVisitorApiByApi();

    int delWebsiteVisitorByApi(List<String> addrs);

    int delWebsiteVisitorApiByApi(List<String> addrs);

    List<String> listWebsiteVisitorAbnormal();

    int delWebsiteVisitorAbnormal(List<String> addrs);

}
